package com.an.blog.admin.domain.bo;

import com.an.common.core.domain.BaseEntity;
import com.an.common.core.validate.AddGroup;
import com.an.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 社会化用户
业务对象 blog_social_user
 *
 * @author Ann
 * @date 2023-08-22
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class BlogSocialUserBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 第三方系统的唯一ID
     */
    @NotBlank(message = "第三方系统的唯一ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private String uuid;

    /**
     * source
     */
    @NotBlank(message = "source不能为空", groups = { AddGroup.class, EditGroup.class })
    private String source;

    /**
     * 用户的授权令牌
     */
    @NotBlank(message = "用户的授权令牌不能为空", groups = { AddGroup.class, EditGroup.class })
    private String accessToken;

    /**
     * 第三方用户的授权令牌的有效期
     */
    @NotNull(message = "第三方用户的授权令牌的有效期不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer expireIn;

    /**
     * 刷新令牌
     */
    @NotBlank(message = "刷新令牌不能为空", groups = { AddGroup.class, EditGroup.class })
    private String refreshToken;

    /**
     * 第三方用户的 open id
     */
    @NotBlank(message = "第三方用户的 open id不能为空", groups = { AddGroup.class, EditGroup.class })
    private String openId;

    /**
     * 第三方用户的 ID
     */
    @NotBlank(message = "第三方用户的 ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private String uid;

    /**
     * 个别平台的授权信息
     */
    @NotBlank(message = "个别平台的授权信息不能为空", groups = { AddGroup.class, EditGroup.class })
    private String accessCode;

    /**
     * 第三方用户的 union id
     */
    @NotBlank(message = "第三方用户的 union id不能为空", groups = { AddGroup.class, EditGroup.class })
    private String unionId;

    /**
     * 第三方用户授予的权限
     */
    @NotBlank(message = "第三方用户授予的权限不能为空", groups = { AddGroup.class, EditGroup.class })
    private String scope;

    /**
     * 个别平台的授权信息
     */
    @NotBlank(message = "个别平台的授权信息不能为空", groups = { AddGroup.class, EditGroup.class })
    private String tokenType;

    /**
     * id token
     */
    @NotBlank(message = "id token不能为空", groups = { AddGroup.class, EditGroup.class })
    private String idToken;

    /**
     * 小米平台用户的附带属性
     */
    @NotBlank(message = "小米平台用户的附带属性不能为空", groups = { AddGroup.class, EditGroup.class })
    private String macAlgorithm;

    /**
     * 小米平台用户的附带属性
     */
    @NotBlank(message = "小米平台用户的附带属性不能为空", groups = { AddGroup.class, EditGroup.class })
    private String macKey;

    /**
     * 用户的授权code
     */
    @NotBlank(message = "用户的授权code不能为空", groups = { AddGroup.class, EditGroup.class })
    private String code;

    /**
     * oauth_token
     */
    @NotBlank(message = "oauth_token不能为空", groups = { AddGroup.class, EditGroup.class })
    private String oauthToken;

    /**
     * oauth_token_secret
     */
    @NotBlank(message = "oauth_token_secret不能为空", groups = { AddGroup.class, EditGroup.class })
    private String oauthTokenSecret;


}
